home *** CD-ROM | disk | FTP | other *** search
/ Deutsche Edition 1 / Deutsche Edition 1.iso / amok / 001-010 / amok08 / printersupport2.0 / printersupport.def < prev    next >
Text File  |  1993-11-04  |  3KB  |  97 lines

  1. (*********************************************************************
  2.  *
  3.  *  :Program.    PrinterSupport.def
  4.  *  :Author.     Michael Frieß
  5.  *  :Address.    Kernerstr. 22a
  6.  *  :Address.    7000 Stuttgart 1
  7.  *  :shortcut.   [mif]
  8.  *  :Version.    2.0
  9.  *  :Date.       18.09.88
  10.  *  :Copyright.  PD
  11.  *  :Language.   Modula-II
  12.  *  :Translator. M2Amiga
  13.  *  :Contents.   PROCEDUREs zum Druckerhandling
  14.  *  :UpDate.     Update von V1.0 [fbs]
  15.  *  :Remark.     Diese Version ist die Zusammenführung zweier
  16.  *  :Remark.     getrennt entwickelter Module. Eines von Fridtjof
  17.  *  :Remark.     und eines von mir.
  18.  *
  19.  *********************************************************************)
  20.  
  21. DEFINITION MODULE PrinterSupport;
  22. (* (C) Copyright 1988 by Michael Frieß and Fridtjof Siebert *)
  23.  
  24. FROM Exec     IMPORT UByte;
  25. FROM Graphics IMPORT RastPortPtr, ColorMapPtr, ViewModeSet;
  26. FROM Printer  IMPORT Special, SpecialSet;
  27.  
  28.  
  29. PROCEDURE OpenPrinter;
  30.   (* :semantic.opens printer for further use. Call this procedure
  31.      :semantic.before working with your printer.
  32.      :note.Current implementation of M2Amiga DOESN´T return whether
  33.      :note.OpenLibrary was successful (TRUE) or not (FALSE).
  34.      :update.Error checking of memory allocation implemented.
  35.      :update.Automatic ClosePrinter when your program is terminated.
  36.   *)
  37.  
  38.  
  39. PROCEDURE ClosePrinter;
  40.   (* :semantic.closes printer.
  41.      :update.If you haven´t closed printer until end of your program,
  42.      :update.it will be automatically closed.
  43.   *)
  44.  
  45.  
  46. PROCEDURE PrintString (s : ARRAY OF CHAR);
  47.   (* :input.s = string to be printed
  48.      :semantic.prints string s with translation of escape sequences.
  49.      :update.Replaces procedure WritePrinter of V1.0
  50.   *)
  51.  
  52. PROCEDURE PrintRaw    (s : ARRAY OF CHAR);
  53.   (* :input.s = string to be printed
  54.      :semantic.prints string s without translation, so you can use
  55.      :semantic.printer specific escape sequences not supported by
  56.      :semantic.printer.device
  57.   *)
  58.  
  59.  
  60. PROCEDURE PrintChar (c : CHAR);
  61.   (* :input.c = char to be printed
  62.      :semantic.prints char c.
  63.   *)
  64.  
  65.  
  66. PROCEDURE PrintCommand (Cmd : CARDINAL; p0, p1, p2, p3 : UByte);
  67.   (* :input.Cmd = Printer Command (see Printer.def)
  68.      :input.p0..p3 = parameters of Cmd. Just set them to zero, if
  69.      :input.         they are unused.
  70.      :semantic.Executes Cmd with given parameters.
  71.   *)
  72.  
  73. PROCEDURE DumpRPort (rp: RastPortPtr; cm: ColorMapPtr;
  74.                     Modes: ViewModeSet; x,y,w,h: CARDINAL;
  75.                     c,r: LONGINT; s: SpecialSet);
  76.   (* :input.rp = Pointer to RastPort to be printed
  77.      :input.cm = Pointer to ColorMap
  78.      :input.Modes =
  79.      :input.x = x offset into rp
  80.      :input.y = y offset into rp
  81.      :input.w = x size in rp to be printed
  82.      :input.h = y size in rp to be printed
  83.      :input.c = column size of area
  84.      :input.r = row size of area
  85.      :input.s = kind of interpretation of c and r
  86.      :semantic.dumps part of rp (specified by x,y,w and h) with
  87.      :semantic.given parameters on printer. For more details see
  88.      :semantic.appendix B of ROM Kernel Reference Manual (Libraries
  89.      :semantic.and Devices)
  90.      :update.none (still not tested)
  91.   *)
  92.  
  93. (* I didn't need this yet so it isn't tested. Only for completion.         *)
  94. (* Use Libraries & Devices Manual (if you have) for further information.   *)
  95.  
  96. END PrinterSupport.
  97.